package chapte05.dome.Examole;

public class demo04 {
    public static void main(String[] args) {
        String s = "itcast";
        System.out.println("将it替换cn.it的结果：" + s.replace("it","cn.it"));
        String s1 = " itcast";
        System.out.println("去除字符串两端空格后的结果：" + s1.trim());
        System.out.println("去除字符串空格后的结果：" + s1.replace("",""));
    }
}
